home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crosscountry USA Photo Safari
/
Crosscountry USA Photo Safari.iso
/
Data
/
cc_base
/
pak00_16bit_f.pk3
/
help.gl.p
< prev
next >
Wrap
Text File
|
2002-12-23
|
5KB
|
141 lines
{
Hidden = TRUE;
ChildID = {
GuiAnimation("background") {
AnimationID = "image/help.pcx";
X = 0;
Y = 0;
},
GuiTextInput("screen_name") {
X = 30;
Y = 40;
Width = 50;
Height = 20;
FontID = "font/verdana_9.tf";
InputDisabled = TRUE;
InputText = Mangle(322/*"Help"*/);
},
GuiListbox("list_topic") {
X = 20;
Y = 61;
Height = 397;
Width = 172;
ListHilightedColor = #8EC2E3;
FontID = "font/arial_black_14.tf";
StrListID = StrList {
Size = 10240;
};
ScriptID = script {
@setup { /* load all help topics */
str topic;
int totalrow_count;
int row_count;
resid help_data;
help_data = ResPropGetResID(ResByName("CSVData"),"help_id");
totalrow_count = CSVGetRowCount(help_data);
GuiListboxClear(SELF);
while (row_count < totalrow_count) {
topic = CSVGetStr(help_data, "menu_topic", row_count);
GuiListboxAppend(SELF, topic);
row_count+=1;
}
}
@loaded{ /* display help description initially */
ResParseEvent(SELF, "@activate");
}
@activate{
str selected_topic;
str getTopic;
str description;
str help_picture;
int get_row;
resid Player;
resid help_data;
Player = ResPropGetResID(ResByName("Game"),"game_cur_player");
help_data = ResPropGetResID(ResByName("CSVData"),"help_id");
selected_topic = GuiListboxGetSelected(SELF);
get_row = CSVSearch(help_data, "menu_topic", selected_topic);
description = CSVGetStr(help_data, "description", get_row);
help_picture = CSVGetStr(help_data, "image", get_row);
if (!(StrExact(help_picture, ""))) { /* load picture, max image size is 422*389 */
ResPropSetInt(GuiChildByName(SELF,"help_picture/help_pic"),"Hidden", FALSE);
ResPropSetStr(GuiChildByName(SELF,"Description"),"InputText", "");
help_picture = StrFormatStr("csv_data/help/%s", help_picture);
Release("help_picture");
Mark("help_picture");
ResPropSetResID(GuiChildByName(SELF,"help_picture/help_pic"), "AnimationID", ResByName(help_picture));
ResPropSetInt(GuiChildByName(SELF,"Description"),"Hidden", TRUE);
} else if (!(StrExact(description, ""))) {
ResPropSetInt(GuiChildByName(SELF,"Description"),"Hidden", FALSE);
ResPropSetStr(GuiChildByName(SELF,"Description"),"InputText", description);
ResPropSetInt(GuiChildByName(SELF,"help_picture/help_pic"),"Hidden", TRUE);
}
}
};
ChildID = {
GuiScrollBar ("sb") {
Kind = VERTICAL;
ChildID = {
GuiButton("thumb") {
StyleID = "gui/laptop/scrollbar/sb_thumb.gbs";
},
GuiButton("dec") {
StyleID = "gui/laptop/scrollbar/sb_uarrow.gbs";
},
GuiButton("inc") {
StyleID = "gui/laptop/scrollbar/sb_darrow.gbs";
}
};
},
GuiLayer("help_picture") {
X = 175;
Y = 5;
Hidden = FALSE;
ChildID = {
GuiAnimation("help_pic") {
X = 0;
Y = 0;
}
};
},
GuiTextInput("Description") {
X = 172;
Y = 0;
Width = 429;
Height = 397;
WordWrap = TRUE;
InputDisabled = TRUE;
FontID = "font/arial_black_14.tf";
InputText = 11264:"";
ChildID = {
GuiScrollBar ("sb") {
Kind = VERTICAL;
ChildID = {
GuiButton("thumb") {
StyleID = "gui/laptop/scrollbar/sb_thumb.gbs";
},
GuiButton("dec") {
StyleID = "gui/laptop/scrollbar/sb_uarrow.gbs";
},
GuiButton("inc") {
StyleID = "gui/laptop/scrollbar/sb_darrow.gbs";
}
};
}
}; /* END OF DESCRIPTION CHILDID */
}
}; /* END OF GUILISTBOX SCRIPT */
} /* END OF GUILISTBOX */
};
}